package mk.com.ldm.corepoint.implementation.client;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;

import mk.com.ldm.corepoint.implementation.shared.DataBaseObject;
import mk.com.ldm.corepoint.implementation.shared.Filter;
import mk.com.ldm.corepoint.implementation.shared.FormObject;
import mk.com.ldm.corepoint.implementation.shared.MenuObject;
import mk.com.ldm.corepoint.implementation.shared.TableRows;
import mk.com.ldm.corepoint.implementation.shared.WorkFlowObject;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("coreService")
public interface CoreService extends RemoteService {
	String login(String username, String Password);
	Boolean loginCheck(String username, String hash);
	String getJson(String username, String objectName, String type, String name);
	FormObject parseConfigObject(String username, String objectName, String type, String name);
	LinkedList<WorkFlowObject> parseWorkFlow(String username, String objectName, String type, String name);
	HashMap<String, String> getKeyValuePairFromTable(String table, ArrayList<DataBaseObject> columns);
	TableRows getTableData(String username, String objectName, String type, String name, int page, 
							int pageSize, String order, HashMap<String, Filter> filters);
	LinkedList<MenuObject> parseMenuMap();
	FormObject fetchConfigObject(String objectName, String itemId, String type, String name);
	ArrayList<String> saveObject(FormObject form, String itemId, String type, HashMap<String, String> params);
	Boolean deleteObject(String type, ArrayList<String> ids);
	String validateListView(HashMap<String, String> params, String value);
	String generateReport(String username, String objectName, String objectType, String name, String order, HashMap<String, Filter> filters, HashMap<String, Boolean> visible, int pageType);
}